import Vue from "vue";

import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    questionInfo: 0,
    currentAnswer: "",
    userInfo: "",
    isBack: false,
  },

  mutations: {
    set_question_info(state, payload) {
      state.questionInfo = payload;
    },
    set_current_answer(state, payload) {
      state.currentAnswer = payload;
    },
    set_user_info(state, payload) {
      state.userInfo = payload;
    },
    set_is_back(state) {
      state.isBack = true;
    }
  },
});
